<div class="admin-content">

    <div class="am-cf am-padding">
        <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">订单</strong> /
            <small>订单配送</small>
        </div>
    </div>

    <!-- <div class="am-g">
        <div class="am-u-sm-12 am-u-md-6">
            <div class="am-btn-toolbar">
                <div class="am-btn-group am-btn-group-xs">
                    <button type="button" class="am-btn am-btn-default" ng-click="selectbyall()"><span
                            class="am-icon-plus"></span> 查询全部
                    </button>
                    <button type="button" class="am-btn am-btn-default" ng-click="selectfinish()"><span
                            class="am-icon-save"></span>已完成订单
                    </button>
                    <button type="button" class="am-btn am-btn-default" ng-click="paystate(0)"><span
                            class="am-icon-archive"></span>未付款订单
                    </button>
                    <button type="button" class="am-btn am-btn-default" ng-click="paystate(2)"><span
                            class="am-icon-trash-o"></span>已退款订单
                    </button>
                </div>
            </div>
        </div>

        <div class="am-u-sm-12 am-u-md-4" style="margin-left: 150px;">
            <div class="am-input-group am-input-group-sm">
                <input type="text" class="am-form-field" ng-model="id" placeholder="请输入要查询的订单（订单号，电话，购买者）">
          <span class="am-input-group-btn">
            <button class="am-btn am-btn-default" type="button" ng-click="selectbyid(id)">搜索</button>
          </span>
        </div>
    </div> -->
    <div class="am-g">
        <div class="am-u-sm-12">
            <form class="am-form">
                <table class="am-table am-table-striped am-table-hover table-main">
                    <thead>
                    <tr>
                        <th class="table-check"><input type="checkbox"/></th>
                        <th class="table-id">ID</th>
                        <th class="table-title">购买者</th>
                        <th class="table-type">订单留言</th>
                        <th class="table-date am-hide-sm-only">订单总额</th>
                        <th class="table-date am-hide-sm-only">实际总额</th>
                        <th class="table-date am-hide-sm-only">下单时间</th>
                        <th class="table-set">支付状态</th>
                        <th class="table-set">订单类型</th>
                        <th class="table-set">收货人</th>
                        <th class="table-set">收获地址</th>
                        <th class="table-set">收货电话</th>
                        <th class="table-set">编辑</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr dir-paginate="order in orders | filter:q | itemsPerPage: 8">
                        <td><input type="checkbox"/></td>
                        <td><a ui-sref="mall.orderdetail({orderid:order.orderid,order:order})">{{order.orderid}}</a>
                        </td>
                        <td>{{order.name}}</td>
                        <td>{{order.buyMessage}}</td>
                        <td class="am-hide-sm-only">{{order.totalFee|currency:'￥'}}</td>
                        <td class="am-hide-sm-only">{{order.payment|currency:'￥'}}</td>
                        <td class="am-hide-sm-only">{{order.createTime|date:'yyyy-MM-dd'}}</td>
                        <td>{{order.paystate| pay_type}}</td>
                        <td>{{order.type | order_type}}</td>
                        <td>{{order.receiverName}}</td>
                        <td>{{order.receiverAddress}}</td>
                        <td>{{order.receiverPhone}}</td>
                        <td>
                            <div class="am-btn-toolbar">
                                <div class="am-btn-group am-btn-group-xs">
                                    <button class="am-btn am-btn-default am-btn-xs am-text-secondary"
                                            ng-click="update(order)"><span
                                            class="am-icon-pencil-square-o"></span>配送
                                    </button>
                                    <!--<button class="am-btn am-btn-default am-btn-xs am-hide-sm-only"><span class="am-icon-copy"></span> 复制</button>-->
                                    <!--<button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"confirmed-click="remove(good.goodsid)" ng-confirm-click="确定删除这个商品 '{{good.title}}'"><span-->
                                    <!--class="am-icon-trash-o"></span> 删除</button>-->
                                </div>
                            </div>
                        </td>
                    </tr>

                    </tbody>

                </table>

                <div class="am-cf">
                    <div class="text-center">
                        <dir-pagination-controls boundary-links="true" on-page-change="pageChangeHandler(newPageNumber)"
                                                 template-url="tpls/pagination/dirPagination.tpl.html"></dir-pagination-controls>
                    </div>
                </div>


            </form>

        </div>

    </div>
</div>